package com.app.model;

import com.app.vo.DeliveryVo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 积分订单
 *
 * @author 16693103420
 * @since 2024-02-01
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("tb_integral_order")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IntegralOrderModel implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;//积分订单表ID
    private String goodsName;//商品名称
    private String goodsColour;//商品颜色
    private String goodsFace;//商品头像
    private Double integral;//积分
    private Double voucher;//益联券
    private Integer number;//数量
    private String goodsDetails;//商品详情
    private Integer status;//状态
    private Integer refundType;//退款类型
    private Integer userId;//用户ID
    private Integer goodsId;//商品ID
    private Integer integralGoodsId;//积分商品ID
    private Integer addressId;
    private Integer expressCompany;//快递公司
    private String trackingNumber;//快递单号
    private String orderSn;
    private String message;
    private String areaId;//区id
    private String cityId;//市id
    private String refundRemarks;
    private Double brokerage;//一级返佣比例
    private Double brokerageTwo;//二级返佣比例
    private Double firstBrokerageFee;//一级返佣金额
    private Double secondBrokerageFee;//二级返佣金额
    private Double refundPrice;//退款金额
    private Double refundUseIntegral;//退使用积分
    private Double refundFirstBrokerageFee;//退一级返佣金额
    private Double refundSecondBrokerageFee;//退二级返佣金额
    @TableField(exist = false)
    private String statusText;//订单状态转义
    @TableField(exist = false)
    private GoodsModel goods;//当前商品对象
    @TableField(exist = false)
    private IntegralGoodsModel integralGoods;//当前积分商品对象
    @TableField(exist = false)
    private UserModel user;//当前商品对象
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private Timestamp updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //后端注解格式化日期
    private LocalDateTime deliveryTime;
    @TableField(exist = false)
    private AddressModel addressModel;
    @TableField(exist = false)
    private Object deliveryVo;
    @TableField(exist = false)
    private String areaText;
    @TableField(exist = false)
    private String area;
    @TableField(exist = false)
    private String city;
    @TableField(exist = false)
    private String province;
    @TableField(exist = false)
    private Double sumAll;

    private Integer goodsType;
    private String codeUrl;
    private String code;



    private Integer businessId;

    private Integer businessUserid;

    /**
     * 营业地址
     */
    @TableField(exist = false)
    private String businessAddress;

    /**
     * 企业名称
     */
    @TableField(exist = false)
    private String businessName;
}
